import React from "react";
import { useHistory } from "react-router-dom";

const Index = () => {
  const history = useHistory();

  const fn = () => {
    localStorage.setItem("token", "sferg");
    history.push("/home/home");
  };

  return (
    <>
      <div>这是登录页</div>
      <button onClick={fn}>登录按钮</button>
    </>
  );
};

export default Index;
